package io.easyspring.demo.basis.rbac.model;

import com.fasterxml.jackson.annotation.JsonView;
import io.easyspring.framework.base.model.BaseModel;
import io.easyspring.framework.base.model.ExtensionBaseModel;
import io.easyspring.framework.base.view.CommonJsonView;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;
import javax.persistence.Table;

/**
 * 用户对象
 *
 * @author summer
 * @version 2.0.0-RELEASE
 * DateTime 2019-10-15 15:15:03
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "rbac_pe_user")
@ApiModel(value="用户对象", description="用户对象")
public class User extends ExtensionBaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称", required = true)
    @JsonView(CommonJsonView.SimpleView.class)
    @NotNull(message = "用户名称不能为空")
    private String name;
    /**
     * 用户编码
     */
    @ApiModelProperty(value = "用户编码", required = true)
    @JsonView(CommonJsonView.SimpleView.class)
    @NotNull(message = "用户编码不能为空")
    private String userCode;

}